package com.zhuangjie.order.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 评价表
 * </p>
 *
 * @author zhuangjie
 * @since 2023-11-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("rating")
@ApiModel(value="Rating对象", description="评价表")
public class Rating implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "评论编号")
      @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "用户表_用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "订单号")
    @TableField("order_number")
    private Long orderNumber;

    @ApiModelProperty(value = "星数（1~5星）")
    @TableField("star_rating")
    private Integer starRating;

    @ApiModelProperty(value = "评论文本")
    @TableField("text")
    private String text;

    @ApiModelProperty(value = "评论时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


}
